package org.jeecg.modules.teacher_course.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.teacher.entity.AstuTeacher;
import org.jeecg.modules.teacher_course.entity.AstuTeacherCourse;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: 教师和课程表
 * @Author: jeecg-boot
 * @Date:   2021-10-09
 * @Version: V1.0
 */
public interface AstuTeacherCourseMapper extends BaseMapper<AstuTeacherCourse> {


    @Select("select * from  astu_teacher_course WHERE course_name=#{courseName}")
    AstuTeacherCourse selectTeacherNumberByCourseName(@Param("courseName") String courseName);

    @Select("select * from  astu_teacher WHERE teacher_number=#{teacherNumber}")
    AstuTeacher selectTeacherByTeacherNumber(@Param("teacherNumber") String teacherNumber);

    @Select("SELECT experiment_id,experiment_name FROM astu_student_score  LEFT JOIN astu_teacher_course  ON astu_teacher_course.course_name = astu_student_score.course_name  AND astu_teacher_course.course_id = astu_student_score.course_id")
    List<Object> selectEIdAndEName();

}
